package com.cn.lycss.servlet;

import com.cn.lycss.dao.CompanyDao;
import com.cn.lycss.model.CompanyModel;
import com.cn.lycss.model.NavModel;
import com.cn.lycss.service.CompanyService;
import com.cn.lycss.service.NavService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/home")
public class HomeServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        CompanyModel companyModel=new CompanyModel();
//        CompanyDao companyDao=new CompanyDao();
//        companyModel.setLogo(companyDao.logo);
//            req.setAttribute("companyModel" ,companyModel);
//        CompanyService companyService=new CompanyService();
//       CompanyModel companyModel= companyService.getCompanyModel();
//        req.setAttribute("companyModel" ,companyModel);
//
//        /*-------------------nav---*/
//        NavModel[] navModels=NavService.getNavModel();
//        req.setAttribute("navModel",navModels);
CommenServlet.aa(req);


        req.getRequestDispatcher("/jsp/home.jsp").forward(req,resp);
    }
}
